package com.meilai.project.service.business.media;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.meilai.project.dto.media.ImportAbPointDTO;
import com.meilai.project.dto.media.MediaPointDTO;
import com.meilai.project.entity.media.MediaPoint;
import com.meilai.project.vo.business.media.CommonPointListVO;
import com.meilai.project.vo.business.media.MediaPointAreaVO;
import com.meilai.project.vo.business.media.MediaPointCountVO;
import com.meilai.project.vo.business.media.SpecialPointListVO;

import javax.servlet.http.HttpServletResponse;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 张驰
 * @date 2022/1/9 23:04
 */
public interface MediaPointService extends IService<MediaPoint> {

    boolean hasMediaPoint(Long media_type_spec);

    List<Integer> listFloorSelections();

    boolean saveList(List<MediaPointDTO> dto);

    CommonPointListVO selectList(MediaPointDTO searchDTO);

    MediaPointDTO getOneById(Long id);

    boolean delete(Long id);

    boolean checkCode(String code, Long id);

    boolean checkABCode(String code, Long building_area_id, Long id);

    boolean bindMarketPoint(MediaPoint dto);

    SpecialPointListVO selectSpecialList(MediaPointDTO searchDTO);

    boolean saveImportAbList(List<ImportAbPointDTO> list, Long building_area_id);


    List<String> getCodeByRegexp(String reg);

    JSONObject getABPointList(Long id);

    /**
     * 导出空位
     */
    void exportLeaveUnusedPointExcel(HttpServletResponse response, LocalDate startDate, LocalDate endDate, List<Long> building_ids, List<Long> media_type_ids, Boolean floor_group, Integer ABType);

    String exportLeaveUnusedPointExcelAndUploadOSS(LocalDate startDate, LocalDate endDate, List<Long> building_ids, List<Long> meda_type_ids, Boolean floor_group, Integer ABType);

    Page<MediaPointAreaVO> getUnlockedPoint(Integer current_page, Integer page_size, String adcode, Long building_id, String code, Long point_type_id, LocalDateTime start_time, LocalDateTime end_time);

    Page<MediaPointCountVO> page(Integer current_page, Integer page_size, String code, Long building_area_id, Long media_type_id, String adcode);
}
